import httpRequest from '../../utils/request'
import modules from '../modules'
const defaultRoute = 'Shopfloor_WorkStation'
const controllerName = 'WorkStation'

export interface WorkStationParam {
  id: string;
  PageSize: string;
  PageIndex: string;
}


// 获取工作站列表
export function ApiGetShopfloor_WorkStationPageListAsync(param: WorkStationParam) {
  return httpRequest({
    url: `${modules.shopfloorModuleUrl}/${controllerName}/Get${defaultRoute}PageList`,
    method: "Post",
    data: param,
  });
}

// 批量删除工作站
export function ApiDeletionShopfloor_WorkStationAsync(param: WorkStationParam) {
  return httpRequest({
    url: `${modules.shopfloorModuleUrl}/${controllerName}/Deletion${defaultRoute}`,
    method: "Post",
    data: param,
  });
}


// 添加工作站
export function ApiCreateShopfloor_WorkStationAsync(param: WorkStationParam) {
  return httpRequest({
    url: `${modules.shopfloorModuleUrl}/${controllerName}/Create${defaultRoute}`,
    method: "Post",
    data: param,
  });
}


// 更新工作站
export function ApiUpdateShopfloor_WorkStationAsync(param: WorkStationParam) {
  return httpRequest({
    url: `${modules.shopfloorModuleUrl}/${controllerName}/Update${defaultRoute}`,
    method: "Post",
    data: param,
  });
}